package com.ethink.framework.common.web.config;

import com.ethink.framework.common.web.interceptor.CustomInterceptor;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 默认SpringMVC拦截器
 *
 * @author yunduo
 * @date 2019/8/5
 */
@Component
public class DefaultWebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CustomInterceptor()).addPathPatterns("/**");
    }
}
